<include file="Public/head" />
</head>
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar"  menu="nrgl.gggl" />

    <div class="mianR">
        <h3 class="yonghu">公告</h3>
        <form id="annForm">
            <div class="gonggao">
                <ul>
                    <li class="clearfix"><span>标题：</span><input type="text" name="ann_title" id="ann_title"/></li>
                    <li class="clearfix"><span>公告内容:</span><span style="width:400px; text-align: left">注意事项:仅支持左对齐；支持空行、换行。</span></li>
                    <li class="clearfix">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <textarea width="20px" height="30px" name="content" id="content"></textarea>
                    </li>
                </ul>
            </div>

            <div class="yongBtn">
                <input type="button" value="确定" class="queding" />
                <input name="reset" type="reset" class="quxiao" value="取消" />
            </div>
    <div class="clear"></div>
    </form>
</div>
<script type="text/javascript">
   /* UE.getEditor('myEditor',{
        //这里可以选择自己需要的工具按钮名称,此处仅选择如下五个
        toolbars:[['FullScreen', 'Source', 'Undo', 'Redo','Bold','test','forecolor','fontsize','editor']],
        //focus时自动清空初始化时的内容
        autoClearinitialContent:true,
        //关闭字数统计
        wordCount:false,
        //关闭elementPath
        elementPathEnabled:false,
        //默认的编辑区域高度
        initialFrameHeight:300
        //更多其他参数，请参考ueditor.config.js中的配置项
    })*/
   $('.quxiao').click(function(){
       window.location.href = "/Announce/index";
   })
    $('.queding').click(function () {
        //var post_data = $("#annForm").serialize();
        //var content = UE.getEditor('myEditor').getContent();

        var ann_title = $("#ann_title").val();
        var content = $("#content").val();
        $.post('/Announce/add_post',{'ann_title':ann_title,'content':content}, function (data) {
            if (data.code != 200) {
                shibai_alert(data.msg, 800);
                return false;
            }
            btn_alert(data.msg, 1000, function () {
                window.location.href = "/Announce/index";
            });
        }, 'json');
    });
</script>
</body>
</html>
